![]() |
DeviceLoopDrawingProcPtr |
||||
Header: | Quickdraw.h | Carbon status: | Supported | |
typedef void(* DeviceLoopDrawingProcPtr) ( SInt16 depth, SInt16 deviceFlags, GDHandle targetDevice, SInt32 userData );
You would declare your function like this if you were to name it MyDeviceLoopDrawingCallback:
void MyDeviceLoopDrawingCallback ( SInt16 depth, SInt16 deviceFlags, GDHandle targetDevice, SInt32 userData );
The pixel depth of the graphics device.
Constants which represent bits that are set to 1 in the gdFlags field of the GDevice structure for the current device. See
A handle to the GDevice structure for the current device.
A value that your application supplies to the DeviceLoop function, which in turn passes the value to your drawing function for whatever purpose you deem useful.
For each video device that intersects a drawing region that you define (generally, the update region of a window), DeviceLoop calls your drawing function. Your drawing function should analyze the pixel depth passed in the depth parameter and the values passed in the deviceFlags parameter, and then draw in a manner that is optimized for the current device.
When highlighting, for example, your application might invert black and white when drawing onto a 1-bit video device but use magenta as the highlight color when drawing onto a color video device. In this case, even were your window to span both a black-and-white and a color screen, the user sees the selection inverted on the black-and-white screen, while magenta would be used to highlight the selection on the color screen.
You must provide a pointer to your MyDeviceLoopDrawingCallback function in the drawingProc parameter for DeviceLoop.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)